﻿<UserControl x:Class="LocultMetro.Views.SettingsAppearance"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="400" d:DesignWidth="600"
             
             xmlns:local="clr-namespace:LocultMetro.Local"
             xmlns:colorpick="clr-namespace:ColorPickerLib.Controls;assembly=ColorPickerLib"
             >
    <Grid>
        <ScrollViewer>
            <StackPanel x:Name="Panel" MinWidth="150" Margin="3">
                <Grid HorizontalAlignment="Left">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition MinWidth="120"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition />
                        <RowDefinition />
                    </Grid.RowDefinitions>

                    <StackPanel Grid.Column="0" Margin="3" MinWidth="100">
                        <Label Content="{x:Static local:LocultMetro_Strings.STR_APPEARANCE_THEME}" ContentStringFormat="{}{0}:" VerticalAlignment="Center" Margin="0,0,16,0" />
                        <ComboBox ItemsSource="{Binding Themes}" SelectedItem="{Binding SelectedTheme, Mode=TwoWay}" DisplayMemberPath="DisplayName" VerticalAlignment="Center" Margin="0,0,0,4" />
                    </StackPanel>

                    <StackPanel Grid.Row="0" Grid.Column="1" Margin="18,3,3,3" MinWidth="200">
                        <!-- ComboBox Grid.Column="1" ItemsSource="{Binding FontSizes}" SelectedItem="{Binding SelectedFontSize, Mode=TwoWay}" VerticalAlignment="Center" / -->

                        <StackPanel Margin="6,3,6,0">
                            <Label Content="{x:Static local:LocultMetro_Strings.STR_FONT_SIZE_LABEL}"
                                           ToolTip="{x:Static local:LocultMetro_Strings.STR_FONT_SIZE_LABEL_TT}"
                                           ContentStringFormat="{}{0}:"
                                           Target="{Binding ElementName=sldFontSize}"
                                           Margin="0,3,3,0"
                                           />
                            <Slider Name="sldFontSize"
                                            Value="{Binding PointFontSize}"
                                            Minimum="{Binding PointFontSizeMin}"
                                            Maximum="{Binding PointFontSizeMax}"
                                            />
                            <TextBlock Text="{Binding PointFontSize , UpdateSourceTrigger=PropertyChanged}" />
                        </StackPanel>
                        <StackPanel Margin="6,0">
                            <Label Content="{x:Static local:LocultMetro_Strings.STR_FIXED_FONT_SIZE_LABEL}"
                                           ToolTip="{x:Static local:LocultMetro_Strings.STR_FIXED_FONT_SIZE_LABEL_TT}"
                                           ContentStringFormat="{}{0}:"
                                           Target="{Binding ElementName=sldFixedFontSize}"
                                           Margin="0,3,3,0"
                                           />
                            <Slider Name="sldFixedFontSize"
                                            Value="{Binding PointFixedFontSize}"
                                            Minimum="{Binding PointFontSizeMin}"
                                            Maximum="{Binding PointFontSizeMax}"
                                            />
                            <TextBlock Text="{Binding PointFixedFontSize , UpdateSourceTrigger=PropertyChanged}" />
                        </StackPanel>


                        <StackPanel Margin="6,12">
                            <Label Content="{x:Static local:LocultMetro_Strings.STR_ICON_SIZE_LABEL}"
                                       ToolTip="{x:Static local:LocultMetro_Strings.STR_ICON_SIZE_LABEL_TT}"
                                       ContentStringFormat="{}{0}:"
                                       Target="{Binding ElementName=sldIconSize}"
                                       Margin="0,3,3,0"
                                       />
                            <Slider Name="sldIconSize"
                                    Value="{Binding PointIconSize}"
                                    Minimum="{Binding PointIconSizeMin}"
                                    Maximum="{Binding PointIconSizeMax}"
                                    />
                            <TextBlock Text="{Binding PointIconSize , UpdateSourceTrigger=PropertyChanged}" />
                        </StackPanel>
                    </StackPanel>
                </Grid>

                <Grid Margin="0, 24">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>

                    <Grid Grid.Column="0">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>

                        <Label Content="{x:Static local:LocultMetro_Strings.STR_ACCENT_LABEL}"
                                           ToolTip="{x:Static local:LocultMetro_Strings.STR_ACCENT_LABEL_TT}"
                                           ContentStringFormat="{}{0}:"
                                           Margin="0,3,3,0"
                                           />

                        <colorpick:ColorPicker Grid.Row="1" HorizontalAlignment="Left"
                                           SelectedColor="{Binding NextAkzentColor}"
                                           IsOpen="{Binding IsOpenColorPicker,UpdateSourceTrigger=PropertyChanged,Mode=OneWayToSource}"
                                           />
                    </Grid>

                    <Grid Grid.Column="1" Margin="12,0">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>

                        <CheckBox Grid.Row="0"
                                  IsChecked="{Binding IsAlternateColorSet}"
                                  Content="{x:Static local:LocultMetro_Strings.STR_IS_ALTERNATE_GRID_COLOR_SET}"
                                  Name="AlternateColorCheckbox"
                                  />

                        <Label Grid.Row="1"
                               Content="{x:Static local:LocultMetro_Strings.STR_ALTERNATE_GRID_COLOR}"
                               ToolTip="{x:Static local:LocultMetro_Strings.STR_ACCENT_LABEL_TT}"
                               ContentStringFormat="{}{0}:"
                               Margin="0,9,3,0"
                               />

                        <colorpick:ColorPicker Grid.Row="2" HorizontalAlignment="Left"
                                               SelectedColor="{Binding AlternateGridColor}"
                                               IsEnabled="{Binding ElementName=AlternateColorCheckbox,Path=IsChecked}"
                                           />
                    </Grid>
                </Grid>
                
            </StackPanel>
        </ScrollViewer>
    </Grid>
</UserControl>